package com.first.common.pojo;


import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
* 课程视频
* @TableName edu_video
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@EqualsAndHashCode(callSuper = false)
@TableName("edu_video")
@ApiModel(value = "视频对象",description = "视频表")
public class EduVideo implements Serializable {

    /**
    * 视频ID
    */
    @ApiModelProperty("视频ID")
    private String id;
    /**
    * 课程ID
    */
    @ApiModelProperty("课程ID")
    private String courseId;
    /**
    * 章节ID
    */
    @ApiModelProperty("章节ID")
    private String chapterId;
    /**
    * 节点名称
    */
    @ApiModelProperty("节点名称")
    private String title;
    /**
    * 云端视频资源
    */
    @ApiModelProperty("云端视频资源")
    private String videoSourceId;
    /**
    * 附属文件
    */
    @ApiModelProperty("附属文件")
    private String videoOriginalName;
    /**
    * 排序字段
    */
    @ApiModelProperty("排序字段")
    private Integer sort;
    /**
    * 播放次数
    */
    @ApiModelProperty("播放次数")
    private Long playCount;
    /**
    * 是否可以试听：0收费 1免费
    */
    @ApiModelProperty("是否可以试听：0收费 1免费")
    private Object isFree;
    /**
    * 视频时长（秒）
    */
    @ApiModelProperty("视频时长（秒）")
    private Double duration;
    /**
    * 1正常,,2修改
    */
    @ApiModelProperty("1正常,,2修改")
    private Integer status;
    /**
    * 视频源文件大小（字节）
    */
    @ApiModelProperty("视频源文件大小（字节）")
    private Long size;
    /**
    * 乐观锁
    */
    @ApiModelProperty("乐观锁")
    private Long version;
    /**
    * 创建时间
    */
    @ApiModelProperty("创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime gmtCreate;
    /**
    * 更新时间
    */
    @ApiModelProperty("更新时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime gmtModified;



}
